#include <graph_partitioner_implementation.hpp>
Public Types | |
typedef AdjacencyList::Index | Index |
The index type. | |
typedef AdjacencyList::IndexVector | IndexVector |
A vector of Indexes. | |
typedef std::vector< IndexVector > | MultiIndexVector |
A vector of IndexVectors. | |
Public Member Functions | |
GraphPartitionerImplementation (const parallel::Communicator &comm) | |
Default constructor. | |
GraphPartitionerImplementation (const parallel::Communicator &comm, const int &local_nodes, const int &local_edges) | |
Construct w/ known local sizes (guesses to size containers, maybe). | |
virtual | ~GraphPartitionerImplementation (void) |
Destructor. | |
void | add_node (const Index &global_index, const Index &original_index) |
Add the global index and original index of a local node. | |
void | add_edge (const Index &edge_index, const Index &node_index_1, const Index &node_index_2) |
void | get_global_edge_ids (int idx, Index *node_index_1, Index *node_index_2) const |
Get the global indices of the buses at either end of a branch. | |
size_t | nodes (void) const |
Get the number of local nodes. | |
Index | node_index (const int &local_index) const |
Get the global node index given a local index. | |
size_t | edges (void) const |
Get the number of local edges. | |
Index | edge_index (const int &local_index) const |
Get the global edge index given a local index. | |
void | partition (void) |
Partition the graph. | |
void | node_destinations (IndexVector &dest) const |
Get the node destinations. | |
void | edge_destinations (IndexVector &dest) const |
Get the edge destinations. | |
void | ghost_node_destinations (MultiIndexVector &dest) const |
Get the destinations of ghosted nodes. | |
void | ghost_edge_destinations (IndexVector &dest) const |
Get the destinations of ghosted edges. |
The index type.
A vector of Indexes.
typedef std::vector<IndexVector> gridpack::network::GraphPartitionerImplementation::MultiIndexVector |
A vector of IndexVectors.
gridpack::network::GraphPartitionerImplementation::GraphPartitionerImplementation | ( | const parallel::Communicator & | comm | ) |
Default constructor.
gridpack::network::GraphPartitionerImplementation::GraphPartitionerImplementation | ( | const parallel::Communicator & | comm, | |
const int & | local_nodes, | |||
const int & | local_edges | |||
) |
Construct w/ known local sizes (guesses to size containers, maybe).
virtual gridpack::network::GraphPartitionerImplementation::~GraphPartitionerImplementation | ( | void | ) | [virtual] |
Destructor.
void gridpack::network::GraphPartitionerImplementation::add_edge | ( | const Index & | edge_index, | |
const Index & | node_index_1, | |||
const Index & | node_index_2 | |||
) |
Add the global index of a local edge and what it connects using the original indices of buses at either end
References gridpack::network::AdjacencyList::add_edge().
void gridpack::network::GraphPartitionerImplementation::add_node | ( | const Index & | global_index, | |
const Index & | original_index | |||
) |
Add the global index and original index of a local node.
References gridpack::network::AdjacencyList::add_node().
void gridpack::network::GraphPartitionerImplementation::edge_destinations | ( | IndexVector & | dest | ) | const |
Get the edge destinations.
Index gridpack::network::GraphPartitionerImplementation::edge_index | ( | const int & | local_index | ) | const |
Get the global edge index given a local index.
References gridpack::network::AdjacencyList::edge_index().
size_t gridpack::network::GraphPartitionerImplementation::edges | ( | void | ) | const |
Get the number of local edges.
References gridpack::network::AdjacencyList::edges().
void gridpack::network::GraphPartitionerImplementation::get_global_edge_ids | ( | int | idx, | |
Index * | node_index_1, | |||
Index * | node_index_2 | |||
) | const |
Get the global indices of the buses at either end of a branch.
References gridpack::network::AdjacencyList::get_global_edge_ids().
void gridpack::network::GraphPartitionerImplementation::ghost_edge_destinations | ( | IndexVector & | dest | ) | const |
Get the destinations of ghosted edges.
void gridpack::network::GraphPartitionerImplementation::ghost_node_destinations | ( | MultiIndexVector & | dest | ) | const |
Get the destinations of ghosted nodes.
void gridpack::network::GraphPartitionerImplementation::node_destinations | ( | IndexVector & | dest | ) | const |
Get the node destinations.
Index gridpack::network::GraphPartitionerImplementation::node_index | ( | const int & | local_index | ) | const |
Get the global node index given a local index.
References gridpack::network::AdjacencyList::node_index().
size_t gridpack::network::GraphPartitionerImplementation::nodes | ( | void | ) | const |
Get the number of local nodes.
References gridpack::network::AdjacencyList::nodes().
void gridpack::network::GraphPartitionerImplementation::partition | ( | void | ) |
Partition the graph.